import { TOKEN } from '@/constant/index.js'
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		yToken:''
	},
	getters: {
		yToken(state) {
			return state.yToken
		}
	},
	mutations: {
		setToken(state, token) {
			try {
				state.yToken = token
				uni.setStorageSync(TOKEN, token)
			} catch (e) {}
		}
	},
	actions: {

	},
	modules: {
		
	}
})
export default store